<template>

<el-descriptions class="margin-top" title="个人信息" 

border>
    <template slot="extra">
      <el-button type="primary" size="small" @click="edit(admin.mid)">修改信息</el-button>
    </template>
     <el-descriptions-item    prop="mid"  >
      <template slot="label"  >
        <i class="el-icon-user-solid"></i>
       ID
      </template >
       {{admin.mid}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label"  >
        <i class="el-icon-user"></i>
        用户名
      </template>
       {{admin.username}}
    </el-descriptions-item>
        <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-s-custom "></i>
       姓名
      </template>
        {{admin.name}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-mobile-phone"></i>
        手机号
      </template>
         {{admin.phone}}
    </el-descriptions-item>
    
  </el-descriptions>


</template>
  <script>
export default {
   data(){
            return {
              admin:''
            }
        },
   methods:{
            edit(id){
                this.$router.push('/adminmesage?id='+id)
            },
           },
   created() {
              const _this = this;
            let  c= JSON.parse(window.localStorage.getItem('admin'))//获取父页面数据
            axios.get('http://localhost:8182/admin/findById/'+c.mid).then(function(resp){
              _this.admin=resp.data.data
                console.log(resp.data.data )
            })
        }
};
</script>
  <style scoped>
</style>
  